package java_collection;

public class Circle2 extends Circle{
	int diameter;
	
	public Circle2(int diameter){
		super(diameter/2);
		this.diameter = diameter;
	}
	
	public String toString(){
		return "Radius : " + super.toString() + ", Diameter : " + diameter;
	}
	
	public boolean equals(Object obj) {
		Circle2 other = (Circle2) obj;
		if (Double.doubleToLongBits(diameter) != Double.doubleToLongBits(other.diameter)) {
			return false;
		}
		
		return true;
	}
}
